package com.heatup.apt.common.dao;


import com.baomidou.mybatisplus.mapper.AutoMapper;
import com.heatup.apt.model.course.CourseStore;
import org.apache.ibatis.annotations.Delete;
import org.springframework.stereotype.Component;

/**
 *
 * CourseStore 表数据库控制层接口
 *
 */
@Component
public interface CourseStoreMapper extends AutoMapper<CourseStore> {


    /**
     * 根据课程ID删除课程门店关联信息
     * @param courseId
     * @return
     */
    @Delete({
            "delete from course_store",
            "where course_id = #{id,jdbcType=INTEGER}"
    })
    int deleteByCourseId(Integer courseId);
    
    /**
     * 获取课程门店
     * @param courseId
     * @return
     */
    String getCourseStoreNameByCourseId(Integer courseId);
}